package com.opal.jx.mapper.mysql;

import com.opal.jx.entity.table.*;

import java.util.List;

public interface JxWLBMapper {
   /**
    * 根据部门pkDept查询员工
    * @param pkDept
    * @return
    */
   List<JxEmp> selectEmpAndDept( String pkDept);

   /**
    * 写死的语句，只用于配件部门;查询除了主管和组长的员工
    * @param pkDept
    * @return
    */
   List<JxEmp> selectPjzEmpNotZgAndZz(String pkDept);

   /**
    * 写死的语句，只用于配件部门;查询主管和组长
    * @param pkDept
    * @return
    */
   List<JxEmp> selectPjzEmpSoAsZgAndZz(String pkDept);

   /**
    * 写死的语句，只用于配件部门;查询绩效中非主管和组长的数据
    * @return
    */
   List<JxAssessWlbPjz> queryJxAssessWlbPjzAndYearAndMonthAndNotManager(Integer year,Integer month);

    /**
     * 写死的语句，只用于配件部门;查询绩效中主管和组长的数据
     * @return
     */
    List<JxAssessWlbPjz> queryJxAssessWlbPjzAndYearAndMonthAndManager(Integer year,Integer month);

    /**
     * 写死的语句，只用于成品科;查询基层的员工
     * @return
     */
    List<JxEmp> selectCpkEmpByDeptAndNotInPostId(String pkDept);

   /**
    * 写死的语句，只用于成品科;查询管理层的员工
    * @return
    */
   List<JxEmp> selectCpkEmpByDeptAndInPostId(String pkDept);

   /**
    * 查找成品科绩效数据-非管理员
    * @param year
    * @param month
    * @return
    */
   List<JxAssessWlbCpk> queryJxAssessWlbCpkAndYearAndMonthAndNotManager(Integer year, Integer month);

   /**
    * 查找成品科绩效数据 -管理员
    * @param year
    * @param month
    * @return
    */
   List<JxAssessWlbCpk> queryJxAssessWlbCpkAndYearAndMonthAndManager(Integer year, Integer month);


    //原材料
   /**
    * 写死的语句，只用于原材料部门;查询除了主管和叉车司机、清洁工
    * @param pkDept
    * @return
    */
   List<JxEmp> selectPjzEmpNotZgAndCcAndQj(String pkDept);

   /**
    * 写死的语句，只用于原材料部门;查询主管和叉车司机、清洁工三个职务员工
    * @param pkDept
    * @return
    */
   List<JxEmp> selectPjzEmpSoAsZgAndCcAndQj(String pkDept);

   /**
    * 写死的语句，只用于原材料部门;找绩效表--查询除了主管和叉车司机、清洁工
    * @return
    */
   List<JxAssessWlbYcl> queryJxAssessWlbYclAndYearAndMonthAndNotManager(Integer year, Integer month);

   /**
    * 写死的语句，只用于原材料部门;找绩效表--查询主管和叉车司机、清洁工
    * @return
    */
   List<JxAssessWlbYcl> queryJxAssessWlbYclAndYearAndMonthAndManager(Integer year,Integer month);

   /**
    * 根据年月查询pmc部门绩效
    * @param year
    * @param month
    * @return
    */
   List<JxAssessWlbPmc> queryJxAssessWlbPmcAndYearAndMonth(Integer year,Integer month);

   /**
    * 根据年月类型查询物流部门合计
    * @param year
    * @param month
    * @param type
    * @return
    */
   List<JxAssessWlbTotal> queryJxAssessWlbTotalAndYearAndMonthAndType(Integer year, Integer month, Integer type);

   //插入
   /**
    * 添加物流部-合计 数据
    * @param jxAssessWlbTotal
    * @return
    */
   int insertWlbTotalData(JxAssessWlbTotal jxAssessWlbTotal);

   /**
    * 添加数据：物流部-pmc部门
    * @param jxAssessWlbPmc
    * @return
    */
   int  insertPmcData(JxAssessWlbPmc jxAssessWlbPmc);

   /**
    * 添加数据：物流部-成品科部门
    * @param jxAssessWlbCpk
    * @return
    */
   void insertCpkData(JxAssessWlbCpk jxAssessWlbCpk);

   /**
    * 添加數據：物流部-配件組部門
    * @param jxAssessWlbPjz
    * @return
    */
   int  insertPjzData(JxAssessWlbPjz jxAssessWlbPjz);

   /**
    * 添加數據：物流部-原材料部门
    * @param jxAssessWlbYcl
    * @return
    */
   int  insertYlcData(JxAssessWlbYcl jxAssessWlbYcl);

   //删除
   /**
    * 根据年月删除数据：物流部-pmc部门
    *
    * @return
    */
   int deletejxAssessWlbPmcByYearAndMonth(Integer year,Integer month);

   /**
    * 刪除数据：物流部-配件组
    * @param year
    * @param month
    * @return
    */
   int deletejxAssessWlbPjzByYearAndMonth(Integer year, Integer month);

   /**
    * 刪除数据：物流部-原材料
    * @param year
    * @param month
    * @return
    */
   int deletejxAssessWlbYclByYearAndMonth(Integer year, Integer month);

   /**
    * 根据年月类型删除数据：物流部-合计
    *
    * @return
    */
   int deletejxAssessWlbTotalByYearAndMonthAndType(Integer year, Integer month, Integer type);

   /**
    * 删除数据：物流部-成品科
    * @param year
    * @param month
    * @return
    */
   int deletejxAssessWlbCpkByYearAndMonth(Integer year, Integer month);



}
